﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ParkingLot.Utility.SerializeHelp
{
    /// <summary>
    /// 序列化的帮助类
    /// </summary>
    public class SerializableHelp
    {
        /// <summary>
        /// 判断该类型是否支持序列化
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static bool IsCanSerializable(Type type)
        {
            if ((type.Attributes & System.Reflection.TypeAttributes.Serializable) == System.Reflection.TypeAttributes.Serializable)
            {
                return true;
            }
            return false;
        }
    }
}
